<template>
    <z-paging @pageScroll="pageScroll">
        <!-- 星空背景 -->
        <ParticleBackground />
        <view class="tp_box">
            <image class="" src="https://image.dingxians.cn/image/2025-07-22/163872340.png" />
        </view>
        <view class="wenzi_bopx">系统更新中 敬请期待！</view>

        <svInterceptIack :show="interceptFlag" :beforeIntercept="beforeIntercept" @backConfirm="backConfirm"
            @backCancel="backCancel"></svInterceptIack>
    </z-paging>
</template>

<script>

import svInterceptIack from './components/sv-intercept-back/sv-intercept-back.vue'
export default {
    components: { svInterceptIack },
    data() {
        return {
            interceptFlag: true

        };
    },
    onLoad() { },
    methods: {
        // 监听滚动高度
        pageScroll(event) {
            uni.$emit("onPageScroll", event.detail.scrollTop)
        },
        async beforeIntercept() {
            const isBack = await new Promise((callback) => {
                // uni.showModal({
                //     title: '系统提示',
                //     content: '是否退出当前页面',
                //     success: ({ confirm }) => {
                //         callback(confirm)
                //     }
                // })
            })
            return isBack
        },
        customBack() {
            console.log('==== customBack')
        },
        backConfirm() {
            console.log('==== backConfirm')
        },
        backCancel() {
            console.log('==== backCancel')
        },
        onback() {
            uni.navigateBack()
        },
        onleave() {
            this.interceptFlag = false
            // 建议此处添加一个短暂的延时，以确保interceptFlag为false时拦截器成功卸载
            setTimeout(() => {
                uni.navigateBack()
            }, 200)
        }
    },
};
</script>

<style lang="scss" scoped>
/deep/.zp-scroll-view-absolute {
    background-image: none !important;
    background-color: #000 !important;
    overflow: hidden !important;
    touch-action: none !important;
}

.tp_box {
    width: 214rpx;
    height: 286rpx;
    margin: auto;
    margin-top: 550rpx;
    margin-bottom: 37rpx;

    image {
        width: 100%;
        height: 100%;
    }
}

.wenzi_bopx {
    width: 100%;
    height: 100rpx;
    line-height: 100rpx;
    font-family: text1;
    font-weight: 400;
    font-size: 40rpx;
    color: #B5B5B5;
    text-align: center;
}
</style>